Arithmetic and Boolean Operations on Recursively Run-Length Compressed Natural Numbers
نویسنده
چکیده
We study arithmetic properties of a new tree-based canonical number representation, recursively run-length compressed natural numbers, defined by applying recursively a run-length encoding of their binary digits. We design arithmetic and boolean operations with recursively runlength compressed natural numbers that work a block of digits at a time and are limited only by the representation complexity of their operands, rather than their bitsizes. As a result, operations on very large numbers exhibiting a regular structure become tractable. In addition, we ensure that the average complexity of our operations is still within constant factors of the usual arithmetic operations on binary numbers. Arithmetic operations on our recursively run-length compressed are specified as pattern-directed recursive equations made executable by using a purely declarative subset of the functional language Haskell.
منابع مشابه
On the Arithmetic of Recursively Run-length Compressed Natural Numbers
We study arithmetic properties of a new treebased number representation, Recursively run-length compressed natural numbers, defined by applying recursively a run-length encoding of their binary digits. Our representation supports novel algorithms that, in the best case, collapse the complexity of various computations by superexponential factors and in the worse case are within a constant factor...
متن کاملA Prolog Specification of Giant Number Arithmetic
The tree based representation described in this paper, hereditarily binary numbers, applies recursively a run-length compression mechanism that enables computations limited by the structural complexity of their operands rather than by their bitsizes. While within constant factors from their traditional counterparts for their worst case behavior, our arithmetic operations open the doors for inte...
متن کاملPrediction of Sulfate Scale Depositions in Oilfield Operations Using Arithmetic of LR Fuzzy Numbers
In this study fuzzy arithmetic is presented as a tool to tackle the prediction of the amount of barium, strontium and calcium sulfates scales in oilfield operations. Since the shape of fuzzy numbers’ membership functions is a spread representative of the whole possible values for a special model parameter, fuzzy numbers are able to consider the uncertainties in parameter determinations and thus...
متن کاملTree-based Arithmetic and Compressed Representations of Giant Numbers
Can we do arithmetic in a completely different way, with a radically different data structure? Could this approach provide practical benefits, like operations on giant numbers while having an average performance similar to traditional bitstring representations? While answering these questions positively, our tree based representation described in this paper comes with a few extra benefits: it c...
متن کاملBinary Tree Arithmetic with Generalized Constructors
We describe arithmetic computations in terms of operations on some well known free algebras (S1S, S2S and ordered rooted binary trees) while emphasizing the common structure present in all them when seen as isomorphic with the set of natural numbers. Constructors and deconstructors seen through an initial algebra semantics are generalized to recursively defined functions obeying similar laws. I...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Sci. Ann. Comp. Sci.
دوره 24 شماره
صفحات -
تاریخ انتشار 2014